package Tests;
import static org.junit.Assert.*;

import org.junit.Test;

import MailSystem.MailSystem;
import MailSystem.Mailbox;


public class MailSystemTest {

	@Test
	public void testFindMailbox() {
		MailSystem system = new MailSystem(10);
		
		Mailbox box = system.findMailbox("1");
		assertEquals("You have reached mailbox 1. \nPlease leave a message now.", box.getGreeting());
	}
	
	@Test
	public void testFindMailBoxDidntFind()
	{
		MailSystem system = new MailSystem(10);
		
		Mailbox box = system.findMailbox("11");
		assertNull(box);
	}
	
	@Test
	public void testBadNumberFindMailBox()
	{
		MailSystem system = new MailSystem(10);
		
		Mailbox box = system.findMailbox("11dsad");
		assertNull(box);
	}

}
